/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package seso;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 *
 * @author Administrator
 */
@Entity
@Table(name = "Season", catalog = "MIS", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "Season.findAll", query = "SELECT s FROM Season s"),
    @NamedQuery(name = "Season.findBySeason", query = "SELECT s FROM Season s WHERE s.season = :season"),
    @NamedQuery(name = "Season.findBySequence", query = "SELECT s FROM Season s WHERE s.sequence = :sequence"),
    @NamedQuery(name = "Season.findByStatus", query = "SELECT s FROM Season s WHERE s.status = :status"),
    @NamedQuery(name = "Season.findBySeasonDescription", query = "SELECT s FROM Season s WHERE s.seasonDescription = :seasonDescription"),
    @NamedQuery(name = "Season.findByRecordOwner", query = "SELECT s FROM Season s WHERE s.recordOwner = :recordOwner"),
    @NamedQuery(name = "Season.findByUserName", query = "SELECT s FROM Season s WHERE s.userName = :userName"),
    @NamedQuery(name = "Season.findByUpdateDate", query = "SELECT s FROM Season s WHERE s.updateDate = :updateDate"),
    @NamedQuery(name = "Season.findByCreateDate", query = "SELECT s FROM Season s WHERE s.createDate = :createDate"),
    @NamedQuery(name = "Season.findBySeasonRemark", query = "SELECT s FROM Season s WHERE s.seasonRemark = :seasonRemark"),
    @NamedQuery(name = "Season.findBySeasonShortYear", query = "SELECT s FROM Season s WHERE s.seasonShortYear = :seasonShortYear"),
    @NamedQuery(name = "Season.findBySeasonShortSequence", query = "SELECT s FROM Season s WHERE s.seasonShortSequence = :seasonShortSequence"),
    @NamedQuery(name = "Season.findByOrderType", query = "SELECT s FROM Season s WHERE s.orderType = :orderType"),
    @NamedQuery(name = "Season.findBySetPackSeason", query = "SELECT s FROM Season s WHERE s.setPackSeason = :setPackSeason"),
    @NamedQuery(name = "Season.findBySetPackFinished", query = "SELECT s FROM Season s WHERE s.setPackFinished = :setPackFinished"),
    @NamedQuery(name = "Season.findBySalesOrderLocked", query = "SELECT s FROM Season s WHERE s.salesOrderLocked = :salesOrderLocked"),
    @NamedQuery(name = "Season.findByOrginalSeason", query = "SELECT s FROM Season s WHERE s.orginalSeason = :orginalSeason"),
    @NamedQuery(name = "Season.findByOrderSequence", query = "SELECT s FROM Season s WHERE s.orderSequence = :orderSequence"),
    @NamedQuery(name = "Season.findByFabricPoMarkup", query = "SELECT s FROM Season s WHERE s.fabricPoMarkup = :fabricPoMarkup"),
    @NamedQuery(name = "Season.findBySeasonForTW", query = "SELECT s FROM Season s WHERE s.seasonForTW = :seasonForTW"),
    @NamedQuery(name = "Season.findBySelected", query = "SELECT s FROM Season s WHERE s.selected = :selected"),
    @NamedQuery(name = "Season.findByMsreplTranVersion", query = "SELECT s FROM Season s WHERE s.msreplTranVersion = :msreplTranVersion")})
public class Season implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "Season")
    private String season;
    @Basic(optional = false)
    @Column(name = "Sequence")
    private String sequence;
    @Basic(optional = false)
    @Column(name = "Status")
    private char status;
    @Basic(optional = false)
    @Column(name = "SeasonDescription")
    private String seasonDescription;
    @Column(name = "RecordOwner")
    private String recordOwner;
    @Column(name = "UserName")
    private String userName;
    @Column(name = "UpdateDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateDate;
    @Column(name = "CreateDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDate;
    @Column(name = "SeasonRemark")
    private String seasonRemark;
    @Column(name = "SeasonShortYear")
    private String seasonShortYear;
    @Column(name = "SeasonShortSequence")
    private String seasonShortSequence;
    @Column(name = "OrderType")
    private Character orderType;
    @Column(name = "SetPackSeason")
    private String setPackSeason;
    @Column(name = "SetPackFinished")
    private Character setPackFinished;
    @Column(name = "SalesOrderLocked")
    private Character salesOrderLocked;
    @Column(name = "OrginalSeason")
    private String orginalSeason;
    @Column(name = "OrderSequence")
    private String orderSequence;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "FabricPoMarkup")
    private BigDecimal fabricPoMarkup;
    @Column(name = "SeasonForTW")
    private String seasonForTW;
    @Column(name = "Selected")
    private Short selected;
    @Basic(optional = false)
    @Column(name = "msrepl_tran_version")
    private String msreplTranVersion;

    public Season() {
    }

    public Season(String season) {
        this.season = season;
    }

    public Season(String season, String sequence, char status, String seasonDescription, String msreplTranVersion) {
        this.season = season;
        this.sequence = sequence;
        this.status = status;
        this.seasonDescription = seasonDescription;
        this.msreplTranVersion = msreplTranVersion;
    }

    public String getSeason() {
        return season;
    }

    public void setSeason(String season) {
        String oldSeason = this.season;
        this.season = season;
        changeSupport.firePropertyChange("season", oldSeason, season);
    }

    public String getSequence() {
        return sequence;
    }

    public void setSequence(String sequence) {
        String oldSequence = this.sequence;
        this.sequence = sequence;
        changeSupport.firePropertyChange("sequence", oldSequence, sequence);
    }

    public char getStatus() {
        return status;
    }

    public void setStatus(char status) {
        char oldStatus = this.status;
        this.status = status;
        changeSupport.firePropertyChange("status", oldStatus, status);
    }

    public String getSeasonDescription() {
        return seasonDescription;
    }

    public void setSeasonDescription(String seasonDescription) {
        String oldSeasonDescription = this.seasonDescription;
        this.seasonDescription = seasonDescription;
        changeSupport.firePropertyChange("seasonDescription", oldSeasonDescription, seasonDescription);
    }

    public String getRecordOwner() {
        return recordOwner;
    }

    public void setRecordOwner(String recordOwner) {
        String oldRecordOwner = this.recordOwner;
        this.recordOwner = recordOwner;
        changeSupport.firePropertyChange("recordOwner", oldRecordOwner, recordOwner);
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        String oldUserName = this.userName;
        this.userName = userName;
        changeSupport.firePropertyChange("userName", oldUserName, userName);
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        Date oldUpdateDate = this.updateDate;
        this.updateDate = updateDate;
        changeSupport.firePropertyChange("updateDate", oldUpdateDate, updateDate);
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        Date oldCreateDate = this.createDate;
        this.createDate = createDate;
        changeSupport.firePropertyChange("createDate", oldCreateDate, createDate);
    }

    public String getSeasonRemark() {
        return seasonRemark;
    }

    public void setSeasonRemark(String seasonRemark) {
        String oldSeasonRemark = this.seasonRemark;
        this.seasonRemark = seasonRemark;
        changeSupport.firePropertyChange("seasonRemark", oldSeasonRemark, seasonRemark);
    }

    public String getSeasonShortYear() {
        return seasonShortYear;
    }

    public void setSeasonShortYear(String seasonShortYear) {
        String oldSeasonShortYear = this.seasonShortYear;
        this.seasonShortYear = seasonShortYear;
        changeSupport.firePropertyChange("seasonShortYear", oldSeasonShortYear, seasonShortYear);
    }

    public String getSeasonShortSequence() {
        return seasonShortSequence;
    }

    public void setSeasonShortSequence(String seasonShortSequence) {
        String oldSeasonShortSequence = this.seasonShortSequence;
        this.seasonShortSequence = seasonShortSequence;
        changeSupport.firePropertyChange("seasonShortSequence", oldSeasonShortSequence, seasonShortSequence);
    }

    public Character getOrderType() {
        return orderType;
    }

    public void setOrderType(Character orderType) {
        Character oldOrderType = this.orderType;
        this.orderType = orderType;
        changeSupport.firePropertyChange("orderType", oldOrderType, orderType);
    }

    public String getSetPackSeason() {
        return setPackSeason;
    }

    public void setSetPackSeason(String setPackSeason) {
        String oldSetPackSeason = this.setPackSeason;
        this.setPackSeason = setPackSeason;
        changeSupport.firePropertyChange("setPackSeason", oldSetPackSeason, setPackSeason);
    }

    public Character getSetPackFinished() {
        return setPackFinished;
    }

    public void setSetPackFinished(Character setPackFinished) {
        Character oldSetPackFinished = this.setPackFinished;
        this.setPackFinished = setPackFinished;
        changeSupport.firePropertyChange("setPackFinished", oldSetPackFinished, setPackFinished);
    }

    public Character getSalesOrderLocked() {
        return salesOrderLocked;
    }

    public void setSalesOrderLocked(Character salesOrderLocked) {
        Character oldSalesOrderLocked = this.salesOrderLocked;
        this.salesOrderLocked = salesOrderLocked;
        changeSupport.firePropertyChange("salesOrderLocked", oldSalesOrderLocked, salesOrderLocked);
    }

    public String getOrginalSeason() {
        return orginalSeason;
    }

    public void setOrginalSeason(String orginalSeason) {
        String oldOrginalSeason = this.orginalSeason;
        this.orginalSeason = orginalSeason;
        changeSupport.firePropertyChange("orginalSeason", oldOrginalSeason, orginalSeason);
    }

    public String getOrderSequence() {
        return orderSequence;
    }

    public void setOrderSequence(String orderSequence) {
        String oldOrderSequence = this.orderSequence;
        this.orderSequence = orderSequence;
        changeSupport.firePropertyChange("orderSequence", oldOrderSequence, orderSequence);
    }

    public BigDecimal getFabricPoMarkup() {
        return fabricPoMarkup;
    }

    public void setFabricPoMarkup(BigDecimal fabricPoMarkup) {
        BigDecimal oldFabricPoMarkup = this.fabricPoMarkup;
        this.fabricPoMarkup = fabricPoMarkup;
        changeSupport.firePropertyChange("fabricPoMarkup", oldFabricPoMarkup, fabricPoMarkup);
    }

    public String getSeasonForTW() {
        return seasonForTW;
    }

    public void setSeasonForTW(String seasonForTW) {
        String oldSeasonForTW = this.seasonForTW;
        this.seasonForTW = seasonForTW;
        changeSupport.firePropertyChange("seasonForTW", oldSeasonForTW, seasonForTW);
    }

    public Short getSelected() {
        return selected;
    }

    public void setSelected(Short selected) {
        Short oldSelected = this.selected;
        this.selected = selected;
        changeSupport.firePropertyChange("selected", oldSelected, selected);
    }

    public String getMsreplTranVersion() {
        return msreplTranVersion;
    }

    public void setMsreplTranVersion(String msreplTranVersion) {
        String oldMsreplTranVersion = this.msreplTranVersion;
        this.msreplTranVersion = msreplTranVersion;
        changeSupport.firePropertyChange("msreplTranVersion", oldMsreplTranVersion, msreplTranVersion);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (season != null ? season.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Season)) {
            return false;
        }
        Season other = (Season) object;
        if ((this.season == null && other.season != null) || (this.season != null && !this.season.equals(other.season))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "seso.Season[ season=" + season + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
    
}
